perm filename MODITO.DOC[SYS,HE] blob sn#686664 filedate 1982-09-03 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00022 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	MODITOR:  an interactive MODel edITOR for ACRONYM's geometric models.
C00005 00003	The current ACRONYM data structure.
C00007 00004	Invoking MODITOR.
C00009 00005	Exiting MODITOR.
C00010 00006	Universal Commands.
C00011 00007	Camera Control.
C00012 00008	How to edit a SCENE.
C00013 00009	How to edit a SCENE-OBJ.
C00014 00010	How to edit an OBJECT.
C00016 00011	How to edit a SUBPART.
C00018 00012	How to move via SUP links.
C00019 00013	How to edit an AFFIXMENT.
C00021 00014	How to edit a CONE-DESCRIPTOR.
C00023 00015	How to edit a SUB-CONE.
C00024 00016	How to edit a SIMPLE-CONE.
C00025 00017	How to edit a SPINE.
C00027 00018	How to edit a CROSS-SECTION.
C00029 00019	How to edit a SWEEPING-RULE.
C00031 00020	How to edit a USER-VARIABLE.
C00032 00021	MAKE-STACK
C00034 00022	MAKE-PARALLEL
C00036 ENDMK
C⊗;
MODITOR:  an interactive MODel edITOR for ACRONYM's geometric models.


This file documents MODITOR, a MODel edITOR for the ACRONYM generalised cone
data structure.  This program was first written by Harald Westphal (HAW) and
Amy Plikerd (AMY) during the summer of 1979, and has been upgraded and changed
by Barry Soroka (BIS) who is currently responsible for maintaining it.
Send gripes and suggestions to him.

Regrettably, you can't use MODITOR too well unless you understand the current
ACRONYM data structure.  The chart on the following page shows the nature of
the graph which MODITOR edits.
We are in the process of revising this data structure to make it
more expressive and more intuitive.

The following pages give an admittedly crude account of how MODITOR is used.
Experience is the best teacher, however, so play around with it a bit and
you should be able to figure it out.

Announcements of changes to MODITOR are mailed thru the file
	SIMULA.DIS[DIS,BIS].
Feel free to add or delete your name.

The current ACRONYM data structure.

scene
  ~
  ↓
scene-obj ###
  ~ ~ ~
  ~ ~ %αααααααααααααααααααα⊃
  ~ %αααααααααα⊃           ~
  ↓            ↓           ↓
object     position     rotation
 ~ ~ ~
 ~ ~ %αααααααααααααααααααααααααααααααααααααααααααααα⊃
 ~ %αααααααα⊃                                       ~
 ↓          ↓                                       ↓
cone     object ###                             affixment
 ~ ~                                              ~~~~
 ~ %αααααααααααααααα⊃                  ⊂αααααααααα$~~%αααααααααααααααα⊃
 ↓                  ↓                  ~       ⊂ααα$%ααααα⊃           ~
simple-cone     sub-cone ###           ↓       ↓          ↓           ↓
 ~  ~  ~          ~ ~ ~               inf     sup     position     rotation
 ~  ~  ~          ~ ~ ~
 ~  ~  ~          ~ ~ %ααααααααααααααααααααααααα⊃
 ~  ~  ~          ~ %ααααααααααααααα⊃           ~
 ~  ~  ~          ↓                 ↓           ↓
 ~  ~  ~        simple-cone     position     rotation
 ~  ~  ~
 ~  ~  %αααααααααααααααααααααααααα⊃
 ~  %ααααααααααα⊃                 ~
 ↓              ↓                 ↓
spine     sweeping-rule     cross-section

Invoking MODITOR.
 
Here's an annotated session to show you how to get into MODITOR:
 
.r acrsim

	That line causes loading of the MODITOR and SIMULATOR code,
	previously loaded and stored on top of the ACRONYM base.

Hi there, Barry
You are using an ACRONYM...... created on 02/12/81 at 20:45:38 by ROD
Running system layer ACRSIM... created on 02/13/81 at 03:36:37 by BIS
Type ? for help

	The workspace comes up with SIMULATOR listening to you.
	To get to top-level LISP, type `q' to SIMULATOR.
	The response is a `*' which indicates that LISP is listening.

*
(parse ↓l1011[mod,rod])

	That ordered loading of the L1011 model (written by ROD).
	ACRONYM acknowledges the loading of the model with

>>Parsed: L1011.MOD[MOD,ROD]
* 

	To get MODITOR running, type...

(moditor)

	... and you'll start getting prompts of the following form:

--- scene Z0001 → (L1011)

How may I serve you, Master?  
 
	Now you can go happily MODITing along.
 
Exiting MODITOR.
 
	To get out, just give the `q' command to a MODITOR prompt.
	(Note that EXIT, HALT, QUIT, and STOP will also be recognised.)

How may I serve you, Master?  q
... Good-by from MODITOR ...
* 

	The `*' means that LISP is now listening to you again,
	and we gracefully exit LISP, resetting all screens &c by typing

(kwit)

Exit
↑C
.
 
	That's all there is to it.
 
Universal Commands.

Certain commands can be given to MODITOR at just about any time.
These we call universal commands.  If you forget them, you can
see the following brief explanation by typing `??' to a prompt:

Universal commands are:
   Q         exit MODITOR
   UVAR      edit a USER-VARIABLE
   V         enable keystroke changes to the View
   W         write a model file of the current scene
   ↑OBJECT   go up from here to an OBJECT
   ↑SCENE    go up from here to the SCENE (top)

Camera Control.

The universal command V (for `View') allows you to change the camera parameters
by swapping you into the SIMULATOR, which has keystroke control
over such things.  Exit the SIMULATOR with `q' or `Q', which will
return you to MODITOR, right where you were.
 
The SIMULATOR is partially documented in the file SIMULA.DOC[SYS,BIS].

How to edit a SCENE.

DISPLAY.

--- scene Z0001 → (Z-AXIS Y-AXIS X-AXIS L1011)

	MODITOR lists the SCENE-OBJs currently known.

HELP.

   ↑        quit
   CREATE   create a new SCENE-OBJ
   1        descend to the 1st SCENE-OBJ &c
   ??       list universal commands

NOTES.

The user is prompted for the name of a new SCENE-OBJ to be CREATEd.
The new SCENE-OBJ is positioned at the origin, with NIL rotation.
It has no SUBPARTs and no CONE-DESCRIPTOR.
 
ENHANCEMENTS NEEDED.
 
It would be nice to be able to delete a SCENE-OBJ.
 
How to edh∂ a SCENE-OBJ.

DISPLAY.

--- scene-obj ---
(1) object:       L1011
(2) position:     (10 20 10)
(3) orientation:  (π2 ABOUT $X-HAT)

HELP.

   ↑    go up to the SCENE (top)
   1    descend to edit the OBJECT
   2    line-edit the POSITION of this SCENE-OBJ
   3    line-edit the ORIENTATION of this SCENE-OBJ
   ??   list universal commands

How to edit an OBJECT.

DISPLAY.

--- object L1011 →
(1) subparts:         (STARBOARD-WING PORT-WING FUSELAGE)
(2) cone-descriptor:  NIL
(3) sup-to:           (FUSELAGE)
(4) inf-to:           NIL

HELP.

   ↑    go back whence we came
   1    edit the SUBPARTs
   2    edit (create) the CONE-DESCRIPTOR
   3    edit AFFIXMENTs for which this OBJECT is SUP
   ??   list universal commands
 
NOTES.
 
To get to a SUBPART of the OBJECT requires TWO steps:  first select `1'
at this level and then select the desired SUBPART as shown on the next page.
 
If the user attempts to edit a null CONE-DESCRIPTOR, a new one will be
created by MODITOR after confirmation by the user.  The new CONE-DESCRIPTOR
can be named by the user, or MODITOR will pick a name by tacking `-CONE'
onto the name of the OBJECT.  The new CONE-DESCRIPTOR will have a null
MAIN-CONE and no SUB-CONEs.
 
To edit AFFIXMENTS for which this OBJECT is SUP, type `3' and then select
the AFFIXMENT you want, as shown on a following page.
 
ENHANCEMENTS NEEDED.
 
There ought to be a way to ``ascend'' via an INF link, thus modifying
AFFIXMENTS for which this OBJECT is INF.
 
How to edit a SUBPART.

DISPLAY.

--- object L1011 has subparts:  
( 1)  STARBOARD-WING
( 2)  PORT-WING
( 3)  FUSELAGE

HELP.

   ↑    go upwards to the OBJECT from whence we came
   1    descend to the 1st SUBPART &c
   0    create a new SUBPART
   ??   list universal commands

NOTES.
 
MODITOR will request confirmation before creating a new SUBPART.
Then the user is prompted for a name for the new SUBPART.
Finally, the user is asked for the name of the OBJECT to which the new one
should be AFFIXed as INF; if the user names a non-existent OBJECT as SUP,
then MODITOR will AFFIX the new SUBPART to the current OBJECT.
The new AFFIXMENT has null position and null rotation.
 
ENHANCEMENTS NEEDED.
 
It would be nice if the user could delete a SUBPART.
 
How to move via SUP links.

DISPLAY.

--- object L1011 is SUPerior to:  
(1) FUSELAGE
(2) BILL

HELP.

   ↑    go back to the OBJECT whence we came
   1    edit the 1st AFFIXMENT &c
   ??   list universal commands

NOTES.
 
After descending to the SUP-TO property of an OBJECT, we may now select
which AFFIXMENT we want to edit.
 
ENHANCEMENTS NEEDED.
 
It would be nice if we could arbitrarily change AFFIXMENTS.  This might
be done using an ``attach'' mechanism similar to that of the editor E,
whereby we would pick up an OBJECT (SUBPART) and then move it over to
the OBJECT to which we want it AFFIXed.
 
How to edit an AFFIXMENT.

DISPLAY.

--- object L1011 is superior to object FUSELAGE with affixment:
(1) position:     NIL
(2) orientation:  NIL

HELP.

   ↑    go up to the OBJECT `L1011'
   2    line-edit the POSITION of this AFFIXMENT
   3    line-edit the ORIENTATION of this AFFIXMENT
   ??   list universal commands

NOTES.
 
You can't change which OBJECT is AFFIXed to which using MODITOR at the present
time.  You can only change the position and orientation of the AFFIXMENT.
 
ENHANCEMENTS NEEDED.
 
It would be nice if we could ``play through'' the AFFIXMENT, moving downwards
from L1011 thru the AFFIXMENT to the OBJECT FUSELAGE.  At the present time,
to get from the node shown above to the node for FUSELAGE, one has to do:
(1) go up to the SUP-TO node; (2) go up to the OBJECT node for L1011; (3)
go down to the SUBPARTs node for L1011; (4) select the OBJECT node for FUSELAGE.
 
How to edit a CONE-DESCRIPTOR.

DISPLAY.

--- cone FCONE →
(1 ) main-cone:  Z0003
(2 ) sub-cones:  Z0021
(3 )             Z0017
(4 )             CABIN
(5 )             NOSE-SECTION
(6 )             ENGINE-FARING
(7 )             TAIL-SECTION

HELP.

   ↑        go up to the OBJECT whence we came
   1        edit the MAIN-CONE
   2        edit the 1st SUB-CONE &c
   0        create a new SUB-CONE
   DELETE   delete the MAIN-CONE or a SUB-CONE
   ??       list universal commands

NOTES.
 
If you type `1' and there is no MAIN-CONE, then a new one will be created
after confirmation of your intention.
 
The creation of new SUB-CONEs must also be confirmed.
 
Names may be given by the user or MODITOR will select a GENSYM name for you.
 
Newly-created SUB-CONEs have null position and rotation with respect to the
coordinate system of the CONE.
 
The creation of a MAIN-CONE or SUB-CONE results in the creation of a new
SIMPLE-CONE with a straight SPINE, hexagonal CROSS-SECTION, constant
SWEEPING-RULE, and with WIRE-FRAME as its DISPLAY property.
 
After typing DELETE, the user is prompted for the cone number and asked
to confirm its deletion.
 
How to edit a SUB-CONE.

DISPLAY.

--- sub-cone of FCONE with
(1) simple-cone:  ENGINE-FARING
(2) position:     (-12.715 0 2.2891)
(3) orientation:  (π ABOUT $Z-HAT)

HELP.

   ↑    go up to the CONE-DESCRIPTOR whence we came
   1    edit the SIMPLE-CONE
   2    line-edit the POSITION of this SIMPLE-CONE
   3    line-edit the ORIENTATION of this SIMPLE-CONE
   ??   list universal commands

How to edit a SIMPLE-CONE.

DISPLAY.

--- simple cone ENGINE-FARING →
(1) spine:          Z0010
(2) cross-section:  Z0009
(3) sweeping-rule:  CSW
(4) display:        NIL

HELP.

   ↑    go back whence we came
   1    edit the SPINE
   2    edit the CROSS-SECTION
   3    edit the SWEEPING-RULE
   4    line-edit the DISPLAY property
   ??   list universal commands

How to edit a SPINE.

DISPLAY.

--- spine  Z0010 →
(1) type:    STRAIGHT
(2) length:  1.987

HELP.

   ↑    go back to the SIMPLE-CONE whence we came
   1    line-edit the TYPE of this SPINE
   2    line-edit the value of LENGTH
   ??   list universal commands

NOTES.
 
When the TYPE of a SPINE is changed some fields become silly and others
become needed.  For example, LENGTH is important to STRAIGHT SPINEs, but
X-COORD, Y-COORD, and Z-COORD are important to NON-PERP SPINEs.  When
MODITing, you will only see the fields which are important for the current
TYPE of this SPINE.  When the TYPE is changed, the newly-required fields
will default to some constant values built into the program.
 
How to edit a CROSS-SECTION.

DISPLAY.

--- cross-section  Z0009 →
(1) type:    CIRCLE
(2) radius:  0.6954

HELP.

   ↑    go back to the SIMPLE-CONE whence we came
   1    line-edit the TYPE of this CROSS-SECTION
   2    line-edit the value of RADIUS
   ??   list universal commands

NOTES.
 
When the TYPE of a CROSS-SECTION is changed some fields become silly and
others become needed.  For example, RADIUS is important to CIRCLE
CROSS-SECTIONs, but SIZE is important to SQUARE CROSS-SECTIONs.  When
MODITing, you will only see the fields which are important for the current
TYPE of this CROSS-SECTION.  When the TYPE is changed, the newly-required
fields will default to some constant values built into the program.
 
How to edit a SWEEPING-RULE.

DISPLAY.

--- SWEEPING-RULE  CSW →
(1) type:   LINEAR
(2) ratio:  0.5

HELP.

   ↑    go back to the SIMPLE-CONE whence we came
   1    line-edit the TYPE of this SWEEPING-RULE
   2    line-edit the value of RATIO
   ??   list universal commands

NOTES.

When the TYPE of a SWEEPING-RULE is changed some fields become silly and
others become needed.  For example, RATIO is important to LINEAR
SWEEPING-RULEs, but no parameters are important to CONSTANT
SWEEPING-RULEs.  When MODITing, you will only see the fields which are
important for the current TYPE of this SWEEPING-RULE.  When the TYPE is
changed, the newly-required fields will default to some constant values
built into the program.
 
How to edit a USER-VARIABLE.

NOTES.

The universal MODITOR command `UVAR' can be given to MODITOR at any time.
The user is prompted for the name of the USER-VARIABLE he wishes to edit.
The line editor is loaded with the current value,
and the user can make the modifications he wants.

ENHANCEMENTS NEEDED.

Expressions cannot be reasonably edited with the system's line editor,
which can only contain a limited number of characters.
An expression can be arbitrarily complex.
A tree editor for expressions would be useful.

Constraints cannot be edited at all with the current MODITOR.

MAKE-STACK

The MAKE-STACK function constructs PARSE-form models
for objects consisting of many cones
with coaxial straight line spines,
stacked end-to-end.

A typical function call is:

    (make-stack sprinkler-stem
    (circle 0.46    constant        1.57)
    (circle 0.13    constant        1.72)
    (hex    4.73    constant        1.08)
    (circle 0.50    constant        0.81)
    (hex    1.25    constant        1.08)
    (circle 0.78    linear          1.05    0.72)
    )

SPRINKLER-STEM will be the name of the created object.
It will have a CONE-DESCRIPTOR named SPRINKLER-STEM-CONE,
which will have a SUB-CONE for each of the pieces described.

The syntax is
	(CIRCLE <length> CONSTANT <diameter>)
or
	(CIRCLE <length> LINEAR <lo-diameter> <hi-diameter>
or
	(HEX <length> CONSTANT <diameter>)
or
	(HEX <length> LINEAR <lo-diameter> <hi-diameter>).

MAKE-STACK writes its output to the terminal,
and the user has to catch it with DRIBBLE or PTYJOB.

MAKE-PARALLEL

The MAKE-PARALLEL function constructs PARSE-form models
for parallel objects of identical length.
SWEEPING-RULE will be CONSTANT for all objects.

A typical function call is:

    (make-parallel foo 5.0
    (0.0 0.0 circle 0.1)
    (1.0 0.0 rectangle 0.1 0.2)
    )

FOO will be the name of the created object.
It will have a CONE-DESCRIPTOR named FOO-CONE,
which will have a SUB-CONE for each of the pieces described.
Each sub-cone will have a length of 5.0 (or whatever you use in its place).

The syntax is
	(<y-offset> <z-offset> CIRCLE <radius>)
or
	(<y-offset> <z-offset> RECTANGLE <y-dimension> <z-dimension>).

MAKE-PARALLEL writes its output to the terminal,
and the user has to catch it with DRIBBLE or PTYJOB.